<!doctype html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<title>Changing the Y-Axis step</title>
	<script src="../../codebase/dhtmlxscheduler.js?v=5.3.10" charset="utf-8"></script>
	<link rel="stylesheet" href="../../codebase/dhtmlxscheduler_material.css?v=5.3.10" type="text/css" charset="utf-8">
	<style>
		html, body{
			margin:0px;
			padding:0px;
			height:100%;
			overflow:hidden;
		}	
		/* Important !!! */
		.dhx_scale_hour{ 
			line-height:normal;
		}
	</style>
	<script>
		window.addEventListener('DOMContentLoaded', function (event) {
			var format = scheduler.date.date_to_str("%H:%i");
			
			// default background image is 44px height, set hour size in order to align the timescale with the background
			scheduler.config.hour_size_px = 88;
			scheduler.templates.hour_scale = function(date){
				var step = 15;
				var html = "";
				for (var i=0; i<60/step; i++){
					html += "<div style='height:22px;line-height:22px;'>"+format(date)+"</div>";
					date = scheduler.date.add(date, step, "minute");
				}
				return html;
			}
			
			scheduler.init('scheduler_here', new Date(2018,0,10), "week");
			scheduler.load("../common/events.json");
		});
	</script>
</head>
<body>
	<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
		<div class="dhx_cal_navline">
			<div class="dhx_cal_prev_button"></div>
			<div class="dhx_cal_next_button"></div>
			<div class="dhx_cal_today_button"></div>
			<div class="dhx_cal_date"></div>
			<div class="dhx_cal_tab" name="day_tab"></div>
			<div class="dhx_cal_tab" name="week_tab"></div>
			<div class="dhx_cal_tab" name="month_tab"></div>
		</div>
		<div class="dhx_cal_header">
		</div>
		<div class="dhx_cal_data">
		</div>		
	</div>
</body>